const { Article } = require('../../model/article');
// const multipart = require('connect-multiparty'); 
// const multipartMiddleware = multipart(); 

module.exports = async(req, res) => {
    res.header('Access-Control-Allow-Origin', '*');
    const id = req.query.id
    const body = req.body;
    await Article.updateOne(body);
    res.redirect('/admin/article');
};